package com.ysdcrm.crm.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ysdcrm.crm.model.Modules;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface IModulesMapper extends BaseMapper<Modules>{
    @Select("select count(name) from modules where nama = #{name}")
    int getNameCount(String name);

    @Select("select * from modules order by weight desc")
    List<Modules> findAll();

    @Update("update modules set status = 0 where mid = #{mid}")
    int del(int mid);
}
